<?php
namespace catchAdmin\permissions\request;

use catchAdmin\permissions\model\Users;
use catcher\base\CatchRequest;

class ProfileRequest extends CatchRequest
{
    protected $needCreatorId = false;

    protected function rules(): array
    {   
        // TODO: Implement rules() method.
        return [
            'username|用户名' => 'require|max:20',
            'email|邮箱'    => 'email',
            'password|密码' => 'regex:/^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[\W_]).{7,}$/',
        ];
    }

    protected function message()
    {
        return [
            'password.regex' => '密码必须是数字、字母、特殊字符的组合'
        ];
    }
}
